<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="pt" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>JAAS</title>
</h:head>
<h:body>
	<h:form>
		<p:panel header="Painel">
			<h:panelGroup
				rendered="#{not empty facesContext.externalContext.userPrincipal.name}">
				<h:outputText
					value="Usuario logado: #{facesContext.externalContext.userPrincipal.name} - " />
					<p:commandButton value="Logoff" action="#{ClienteBean.sair}" />
			</h:panelGroup>
			

			<h:outputText value="Teste JAAS"
				style="font: 18px Arial; font-weight: bold;" />
			<p />
			<h:commandLink action="/view/cadAltUser.xhtml?faces-redirect=true"
				value="Area Publica" />
			<h:outputText value=" | " />
			<h:commandLink
				action="/view/usuarios/user/user.xhtml?faces-redirect=true"
				value="Area do Usuario" />
			<h:outputText value=" | " />
			<h:commandLink
				action="/view/usuarios/admin/index.xhtml?faces-redirect=true"
				value="Area do Administrador" />
		</p:panel>
	</h:form>


</h:body>
</html>